import Vue from 'vue'
import VueRouter from 'vue-router'
import route from './routes';

Vue.use(VueRouter)

const routes = [
  ...route
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})
/**
 * 
 */
// let token  = "sdakjhgfijlsadhjgfhasljihgiu";
// router.beforeEach((to,from,next)=>{
//   if(to.path==="/cart"){
//     if(token){
//       next()
//     }else{
//       next("/login")
//     }
//   }else{
//     next()
//   }
// })

export default router
